import moment from 'moment'

// 收款账户管理
export const PageListThead = [
  {
    type: 'selection',
    width: 60,
    align: 'center'
  },
  // {
  //   title: '集团公司',
  //   key: 'parentName',
  //   minWidth: 150
  // },
  // {
  //   title: '客户名称',
  //   key: 'companyName',
  //   minWidth: 150
  // },
  {
    title: '交易时间',
    key: 'dealTime',
    minWidth: 240,
    render: (h, params) => {
      const text = params.row.dealTime ? moment(params.row.dealTime).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '到款银行',
    key: 'bankName',
    minWidth: 150
  },
  {
    title: '对方户名',
    key: 'accountName',
    minWidth: 240
  },
  {
    title: '对方账号',
    key: 'accountNo',
    minWidth: 150
  },
  {
    title: '金额',
    key: 'amt',
    minWidth: 150
  },
  {
    title: '银行备注',
    key: 'remark',
    minWidth: 150
  },
  {
    title: '匹配金额',
    key: 'matchAmt',
    minWidth: 150
  },
  {
    title: '匹配结果',
    key: 'matchResult',
    minWidth: 150
  },
  {
    title: '智能匹配',
    key: 'matchRemark',
    minWidth: 150
  },
  {
    title: '所属客服',
    key: 'serverName',
    minWidth: 150
  },
  {
    title: '创建时间',
    key: 'createTime',
    minWidth: 180,
    render: (h, params) => {
      let row = params.row
      let times = ''
      if (row.createTime) {
        times = row.createTime.slice(0, 19).replace(/T/g, ' ')
      }
      return h('span', times)
    }
  },
  {
    title: '操作',
    width: 240,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
]
